import { createRouter, createWebHashHistory } from 'vue-router'
import HmFind from '@/views/HmFind.vue'
import HmMy from '@/views/HmMy.vue'
import HmFriend from '@/views/HmFriend.vue'

// 1. 创建一个全局的路由对象
const router = createRouter({
  // 1.1 配置路由模式
  // hash-->#/xx/xx, history-->/xx/xx
  history: createWebHashHistory(),
  // 1.2 路由规则数组
  routes: [
    {path: '/find', component: HmFind},
    {path: '/my', component: HmMy},
    {path: '/friend', component: HmFriend}
  ]
})

// 2. 导出
export default router